# 使用python:3.9.13作为基础镜像
FROM python:3.9.13

# 资源拷贝
COPY . /app

# 升级pip
RUN python -m pip install --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple

RUN python -V
RUN pip -V

# 安装依赖
RUN pip install -r /app/requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# 设置工作目录
WORKDIR /app

CMD ["python", "main.py"]
